﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ManageSystem
{
    public partial class MyInfo : Form
    {
        private string userId;
        public MyInfo()
        {
            InitializeComponent();
        }
        public MyInfo(string userId)
        {
            InitializeComponent();
            this.userId = userId;
            initData();
        }

        private void initData()
        {
            string str = "select * from UserInfo where userId=" + userId;
            SqlDataReader sqlDr = Utils.getDataReader(str);
            if (sqlDr.Read())
            {
                label6.Text = sqlDr[3].ToString();
                label7.Text = sqlDr[4].ToString();
                label8.Text = sqlDr[5].ToString();
                label9.Text = sqlDr[7].ToString();
                label10.Text = sqlDr[6].ToString().Substring(0, 10);
            }
        }

        private void label10_Click(object sender, EventArgs e)
        {

        }
    }
}
